package entry43.ref;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import org.junit.Test;

class Cheese {
}

public class CheeseStore {
	private int amount = 300;

	public List<Cheese> getCheeses() {
		if (amount == 0) {
			return Collections.emptyList();
		}

		amount -= 300;
		List<Cheese> list = new ArrayList<Cheese>();
		for (int i = 0; i < 3; i++) {
			list.add(new Cheese());
		}
		return list;
	}

	public void eat() {
		List<Cheese> list = getCheeses();

		for (int i = 0; i < list.size(); i++) {
			System.out.println("냠냠");
		}
	}

	@Test
	public void testEat() {
		eat();
		eat();
	}
}
